<!DOCTYPE html>

<html lang="en">
<head>
  <!-- Required meta tags -->
  <meta charset="utf-8">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  <meta name="viewport"
        content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
  <meta name="baidu-site-verification" content="GOgEP8c1pN"/>
  

  <title>
    在 Django Admin 后台发布文章_Django博客教程_追梦人物的博客</title>

  <link href="font-awesome.min.css"
        rel="stylesheet">
  <link rel="stylesheet" href="mobi.min.css">
  <link rel="stylesheet" href="modal.min.css">
  <link rel="stylesheet" href="friendly.css">
  <link rel="stylesheet" href="blog.css?v0.12">
  <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
  <script src="/static/blog/js/menu.js"></script>
  <script src="/static/blog/js/modal.min.js"></script>
  <script src="/static/blog/js/blog.js"></script>
  

  
    <script>
        // baidu statistics
        var _hmt = _hmt || [];
        (function () {
            var hm = document.createElement("script");
            hm.src = "https://hm.baidu.com/hm.js?fb59b2a6022bccc02671a750f61c356b";
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(hm, s);
        })();

        // baidu auto push
        (function () {
            var bp = document.createElement('script');
            var curProtocol = window.location.protocol.split(':')[0];
            if (curProtocol === 'https') {
                bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
            }
            else {
                bp.src = 'http://push.zhanzhang.baidu.com/push.js';
            }
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(bp, s);
        })();
    </script>
    
  
</head>
<body class="bg-light">
<header>
  <nav class="flex-center bg-white nav-bar">
    <div class="container-wider flex-middle">
      
  <a class="show-on-mobile nav-link m-5" id="js-sidebar-btn" href="#" role="button">
    <i class="fa fa-chevron-right" aria-hidden="true"></i>
  </a>

      <a class="nav-bar-logo mr-7" href="/">
        <img src="/static/blog/images/logo.png" alt="blog logo">
      </a>
      <ul class="unit-0 hide-on-mobile nav-bar-nav">
        <li class="nav-item mr-7">
          <a class="nav-link" href="/">首页</a>
        </li>
        <li class="nav-item mr-7">
          <a class="nav-link" href="/tutorials/">教程</a>
        </li>
        <li class="nav-item mr-7">
          <a class="nav-link" href="/categories/">分类</a>
        </li>
        <li class="nav-item mr-7">
          <a class="nav-link" href="/archives/">归档</a>
        </li>
        <li class="nav-item">
          <a class="nav-link" href="/donate/">赞助</a>
        </li>
      </ul>
      <div class="unit flex-right flex-middle">
        <form class="hide-on-mobile flex-left flex-middle search-form mr-5" id="search-form"
              action="/search/">
          <input class="unit" type="search" name="q" placeholder="搜索..."/>
          <button class="unit-0" type="submit" role="button">
            <i class="fa fa-search" aria-hidden="true"></i>
          </button>
        </form>
        <a class="show-on-mobile nav-link fs-7 mr-7" id="js-search-btn" href="#" role="button">
          <i class="fa fa-search" aria-hidden="true"></i>
        </a>
        <div class="flex-middle notification">
          
            <a class="nav-link" href="/accounts/login/">
              <i class="fa fa-sign-in" aria-hidden="true"></i>
            </a>
          
        </div>
        <div class="show-on-mobile flex-middle">
          <a class="nav-link fs-7 ml-7 mr-5" id="menu-toggle" href="#">
            <i class="fa fa-ellipsis-v" aria-hidden="true"></i>
          </a>
          <ul class="menu bg-white" data-menu data-menu-toggle="#menu-toggle">
            <li class="nav-item mr-7">
              <a class="nav-link" href="/">首页</a>
            </li>
            <li>
              <a href="/tutorials/">教程</a>
            </li>
            <li>
              <a href="/categories/">分类</a>
            </li>
            <li>
              <a href="/archives/">归档</a>
            </li>
            <li>
              <a href="/donate/">赞助</a>
            </li>
          </ul>
        </div>
      </div>
    </div>
  </nav>
</header>
<section class="flex-center">
  <div class="container-wider">
    <!-- 模态框（Modal） -->
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog"
         aria-labelledby="myModalLabel" aria-hidden="true">
      <div class="modal-dialog">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
              &times;
            </button>
            <h4 class="modal-title" id="myModalLabel">设置评论回复接收邮箱</h4>
            <div class="text-primary mt-2">邮箱仅用于接收回复提醒，不会被公开。</div>
            
          </div>
          <div class="modal-body">
            <form class="form email-binding-form" action="/comments/ajax_email_binding/">
              <div class="message">
                <span class="text-danger"></span>
              </div>
              <input type='hidden' name='csrfmiddlewaretoken' value='blz40L0DRtDGiUP5hc34nTOcHLx9H7AVq5Xm2WtG1VR5BQFJB3Aws8DkG8KVpx8J' />
              <div class="flex-left units-gap">
                <label class="unit-0 text-right" for="multiple-inputs-name">邮箱: </label>
                <div class="unit">
                  <input type="email" name="email" id="id_email" placeholder="请输入绑定邮箱"/>
                </div>
                <div class="unit-0">
                  <button class="btn" id="js-send" type="button"
                          data-target="/comments/ajax_verification_code/">发送验证码
                  </button>
                </div>
              </div>
              <div class="flex-left units-gap">
                <label class="unit-0 text-right" for="multiple-inputs-name">验证码: </label>
                <div class="unit">
                  <input type="text" name="verification_code" id="id_verification_code"
                         placeholder="请输入接收到的验证码"/>
                </div>
              </div>
              <div class="flex-right">
                <button type="button" class="btn btn-danger mr-3" data-dismiss="modal">关闭</button>
                <button type="submit" class="btn btn-primary" id="js-submit">设置</button>
              </div>
            </form>
          </div>
        </div><!-- /.modal-content -->
      </div><!-- /.modal -->
    </div>
    <div class="flex-left flex-wrap "
         style="margin-top: 60px">
      
  <aside class="unit-1-4 unit-1-on-mobile top-gap">
    <div class="scroll-view bg-white card toc-sidebar" style="height: 100%">
      <div class="card-header">
        目录
      </div>
      <div class="flex-left">
        <div class="unit-1-4">
          <a href="https://promotion.aliyun.com/ntms/act/group/team.html?group=FcfAncJPAp" target="_blank"><img
              src="/static/blog/images/aliyun.jpg" alt=""></a>
        </div>
        <div class="unit-1-2 flex-vertical top-gap text-small">
          <a style="color: #e83e8c" target="_blank"
             href="https://promotion.aliyun.com/ntms/act/group/team.html?group=FcfAncJPAp">云服务器新用户</a>
          <a style="color: #6610f2" target="_blank"
             href="https://promotion.aliyun.com/ntms/act/group/team.html?group=FcfAncJPAp">8元/月</a>
        </div>
      </div>
      <div class="card-body">
        <ul>
          <li>
            <h6 class="top-gap-0"><a href="">Django博客教程</a></h6>
            <ul>
              
                <li>
                  <a href="2.html">前言</a>
                  
                </li>
              
                <li>
                  <a href="3.html">搭建开发环境</a>
                  
                </li>
              
                <li>
                  <a href="4.html">建立 Django 博客应用</a>
                  
                </li>
              
                <li>
                  <a href="5.html">创建 Django 博客的数据库模型</a>
                  
                </li>
              
                <li>
                  <a href="6.html">让 Django 完成翻译：迁移数据库</a>
                  
                </li>
              
                <li>
                  <a href="7.html">Django 博客首页视图</a>
                  
                </li>
              
                <li>
                  <a href="8.html">真正的 Django 博客首页视图</a>
                  
                </li>
              
                <li>
                  <a href="9.html">在 Django Admin 后台发布文章</a>
                  
                    <div class="toc">
<ul>
<li><a href="#创建-admin-后台管理员账户">创建 Admin 后台管理员账户</a></li>
<li><a href="#在-admin-后台注册模型">在 Admin 后台注册模型</a></li>
<li><a href="#定制-admin-后台">定制 Admin 后台</a></li>
<li><a href="#总结">总结</a></li>
</ul>
</div>

                  
                </li>
              
                <li>
                  <a href="10.html">博客文章详情页</a>
                  
                </li>
              
                <li>
                  <a href="11.html">支持 Markdown 语法和代码高亮</a>
                  
                </li>
              
                <li>
                  <a href="12.html">页面侧边栏：使用自定义模板标签</a>
                  
                </li>
              
                <li>
                  <a href="13.html">分类与归档</a>
                  
                </li>
              
                <li>
                  <a href="14.html">评论</a>
                  
                </li>
              
                <li>
                  <a href="16.html">已知小问题修正</a>
                  
                </li>
              
                <li>
                  <a href="20.html">使用 Nginx 和 Gunicorn 部署 Django 博客</a>
                  
                </li>
              
                <li>
                  <a href="21.html">使用 Fabric 自动化部署</a>
                  
                </li>
              
                <li>
                  <a href="29.html">统计文章阅读量</a>
                  
                </li>
              
                <li>
                  <a href="32.html">自动生成文章摘要</a>
                  
                </li>
              
                <li>
                  <a href="33.html">基于类的通用视图：ListView 和 DetailView</a>
                  
                </li>
              
                <li>
                  <a href="34.html">Django Pagination 简单分页</a>
                  
                </li>
              
                <li>
                  <a href="37.html">Django Pagination 完善分页</a>
                  
                </li>
              
                <li>
                  <a href="38.html">统计各个分类下的文章数</a>
                  
                </li>
              
                <li>
                  <a href="39.html">标签云</a>
                  
                </li>
              
                <li>
                  <a href="41.html">RSS 订阅</a>
                  
                </li>
              
                <li>
                  <a href="43.html">Markdown 自动生成文章目录</a>
                  
                </li>
              
                <li>
                  <a href="44.html">简单全文搜索</a>
                  
                </li>
              
                <li>
                  <a href="45.html">Django Haystack 全文检索与关键词高亮</a>
                  
                </li>
              
            </ul>
          </li>
        </ul>
      </div>
    </div>
  </aside>

      
  <div class="unit-3-4 unit-1-on-mobile top-gap">
    


<div class="bg-white card post-card px-7 py-5">
  
<article class="post">
  <h1 class="top-gap-0">在 Django Admin 后台发布文章</h1>
  <ul class="list-inline dot-divider post-meta">
    <li class="list-inline-item text-small text-muted">
      12 月前
    </li>
    <li class="list-inline-item text-small text-muted">2032 字
    </li>
    <li class="list-inline-item text-small text-muted">
      29501 阅读
    </li>
    <li class="list-inline-item text-small text-muted">
      90 评论
    </li>
  </ul>
  <div class="top-gap-big post-body">
    <p>在此之前我们完成了 Django 博客首页视图的编写，我们希望首页展示发布的博客文章列表，但是它却抱怨：暂时还没有发布的文章！如它所言，我们确实还没有发布任何文章，本节我们将使用 Django 自带的 Admin 后台来发布我们的博客文章。</p>
<h2 id="创建-admin-后台管理员账户">创建 Admin 后台管理员账户</h2>
<p>要想进入Django Admin 后台，首先需要创建一个超级管理员账户。我们在 <a href="http://zmrenwu.com6.html">让 Django 完成翻译：迁移数据库</a> 中已经创建了一个后台账户，但如果你没有按照前面的步骤创建账户的话，可以运行 <code>python manage.py createsuperuser</code> 命令新建一个：</p>
<div class="codehilite"><pre><span></span><span class="n">python</span> <span class="n">manage</span><span class="p">.</span><span class="n">py</span> <span class="n">createsuperuser</span>

<span class="n">Username</span> <span class="p">(</span><span class="n">leave</span> <span class="n">blank</span> <span class="n">to</span> <span class="n">use</span> <span class="err">&#39;</span><span class="n">zmrenwu</span><span class="mf">@163.</span><span class="n">com</span><span class="err">&#39;</span><span class="p">)</span><span class="o">:</span>  <span class="n">admin</span>
<span class="n">Email</span> <span class="nl">address</span><span class="p">:</span>  <span class="n">admin</span><span class="p">@</span><span class="n">example</span><span class="p">.</span><span class="n">com</span>
<span class="nl">Warning</span><span class="p">:</span> <span class="n">Password</span> <span class="n">input</span> <span class="n">may</span> <span class="n">be</span> <span class="n">echoed</span><span class="p">.</span>
<span class="nl">Password</span><span class="p">:</span>  <span class="o">******</span>
<span class="nl">Warning</span><span class="p">:</span> <span class="n">Password</span> <span class="n">input</span> <span class="n">may</span> <span class="n">be</span> <span class="n">echoed</span><span class="p">.</span>
<span class="n">Password</span> <span class="p">(</span><span class="n">again</span><span class="p">)</span><span class="o">:</span>  <span class="o">******</span>
<span class="n">Superuser</span> <span class="n">created</span> <span class="n">successfully</span><span class="p">.</span>
</pre></div>


<p><strong>注意：在命令行输入密码时可能不会显示输入的字符，不要以为键盘坏了，照正常的方式输入密码即可。</strong></p>
<h2 id="在-admin-后台注册模型">在 Admin 后台注册模型</h2>
<p>要在后台注册我们自己创建的几个模型，这样 Django Admin 才能知道它们的存在，注册非常简单，只需要在 blog\admin.py 中加入下面的代码：</p>
<div class="codehilite"><pre><span></span><span class="n">blog</span><span class="o">/</span><span class="n">admin</span><span class="o">.</span><span class="n">py</span>

<span class="kn">from</span> <span class="nn">django.contrib</span> <span class="kn">import</span> <span class="n">admin</span>
<span class="kn">from</span> <span class="nn">.models</span> <span class="kn">import</span> <span class="n">Post</span><span class="p">,</span> <span class="n">Category</span><span class="p">,</span> <span class="n">Tag</span>

<span class="n">admin</span><span class="o">.</span><span class="n">site</span><span class="o">.</span><span class="n">register</span><span class="p">(</span><span class="n">Post</span><span class="p">)</span>
<span class="n">admin</span><span class="o">.</span><span class="n">site</span><span class="o">.</span><span class="n">register</span><span class="p">(</span><span class="n">Category</span><span class="p">)</span>
<span class="n">admin</span><span class="o">.</span><span class="n">site</span><span class="o">.</span><span class="n">register</span><span class="p">(</span><span class="n">Tag</span><span class="p">)</span>
</pre></div>


<p><strong>激活虚拟环境</strong>，运行开发服务器，访问 http://127.0.0.1:8000/admin/ ，就进入了到了Django Admin 后台登录页面，输入刚才创建的管理员账户密码就可以登录到后台了。</p>
<p><img alt="Django Admin 后台" src="//bkt.zmrenwu.com/Django%20Admin%20%E5%90%8E%E5%8F%B0.png" /></p>
<p>可以看到我们刚才注册的三个模型了，点击 Posts 后面的<strong>增加</strong>按钮，将进入添加 Post 的页面，也就是新增博客文章。然后在相关的地方输入一些测试用的内容，增加完后点击保存，这样文章就添加完毕了，你也可以多添加几篇看看效果。注意每篇文章必须有一个分类，在添加文章时你可以选择已有分类。如果数据库中还没有分类，在选择分类时点击 Category 后面的 + 按钮新增一个分类即可。</p>
<p><img alt="Django Admin 后台新增文章" src="//bkt.zmrenwu.com/Django%20Admin%20%E5%90%8E%E5%8F%B0%E6%96%B0%E5%A2%9E%E6%96%87%E7%AB%A0.png" /></p>
<p><strong>你可能想往文章内容中添加图片，但目前来说还做不到。在支持 Markdown 语法部分中将介绍如何在文章中插入图片的方法。</strong></p>
<p>访问 http://127.0.0.1:8000/ 首页，你就可以看到你添加的文章列表了，下面是我所在环境的效果图：</p>
<p><img alt="博客首页显示的文章列表" src="//bkt.zmrenwu.com/%E5%8D%9A%E5%AE%A2%E9%A6%96%E9%A1%B5%E6%98%BE%E7%A4%BA%E7%9A%84%E6%96%87%E7%AB%A0%E5%88%97%E8%A1%A8.png" /></p>
<h2 id="定制-admin-后台">定制 Admin 后台</h2>
<p>在 admin post 列表页面，我们只看到了文章的标题，但是我们希望它显示更加详细的信息，这需要我们来定制 Admin 了，在 admin.py 添加如下代码：</p>
<div class="codehilite"><pre><span></span><span class="n">blog</span><span class="o">/</span><span class="n">admin</span><span class="o">.</span><span class="n">py</span>

<span class="kn">from</span> <span class="nn">django.contrib</span> <span class="kn">import</span> <span class="n">admin</span>
<span class="kn">from</span> <span class="nn">.models</span> <span class="kn">import</span> <span class="n">Post</span><span class="p">,</span> <span class="n">Category</span><span class="p">,</span> <span class="n">Tag</span>

<span class="k">class</span> <span class="nc">PostAdmin</span><span class="p">(</span><span class="n">admin</span><span class="o">.</span><span class="n">ModelAdmin</span><span class="p">):</span>
    <span class="n">list_display</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;title&#39;</span><span class="p">,</span> <span class="s1">&#39;created_time&#39;</span><span class="p">,</span> <span class="s1">&#39;modified_time&#39;</span><span class="p">,</span> <span class="s1">&#39;category&#39;</span><span class="p">,</span> <span class="s1">&#39;author&#39;</span><span class="p">]</span>

<span class="c1"># 把新增的 PostAdmin 也注册进来</span>
<span class="n">admin</span><span class="o">.</span><span class="n">site</span><span class="o">.</span><span class="n">register</span><span class="p">(</span><span class="n">Post</span><span class="p">,</span> <span class="n">PostAdmin</span><span class="p">)</span>
<span class="n">admin</span><span class="o">.</span><span class="n">site</span><span class="o">.</span><span class="n">register</span><span class="p">(</span><span class="n">Category</span><span class="p">)</span>
<span class="n">admin</span><span class="o">.</span><span class="n">site</span><span class="o">.</span><span class="n">register</span><span class="p">(</span><span class="n">Tag</span><span class="p">)</span>
</pre></div>


<p>由于如何定制 Admin 后台不是本教程的重点，这里只是为了简单地到达期望效果，因此不再对上述代码做过多解释。</p>
<p>刷新 Admin Post 列表页面，可以看到显示的效果好多了。</p>
<p><img alt="定制后的 Admin 文章列表页" src="//bkt.zmrenwu.com/%E5%AE%9A%E5%88%B6%E5%90%8E%E7%9A%84%20Admin%20%E6%96%87%E7%AB%A0%E5%88%97%E8%A1%A8%E9%A1%B5.png" /></p>
<h2 id="总结">总结</h2>
<p>本章节的代码位于：<a href="https://github.com/zmrenwu/django-blog-tutorial/tree/Step7_publish-posts-using-django-admin">Step7: publish posts using django admin</a>。</p>
<p>如果遇到问题，请通过下面的方式寻求帮助。</p>
<ul>
<li>在下方评论区留言。</li>
<li>将问题的详细描述通过邮件发送到 djangostudyteam@163.com，一般会在 24 小时内回复。</li>
<li>在 <a href="http://www.pythonzh.cn/category/newbie-qa/">Pythonzhcn 社区的新手问答版块</a> 发布帖子。</li>
</ul>
    <p class="text-center">
      -- EOF --
    </p>
    <div>
      <button class="btn btn-primary" id="js-reward"><i class="fa fa-jpy"
                                                        aria-hidden="true"></i>
        如果觉得文章对你有帮助，请随意打赏
        <i class="fa fa-chevron-down" aria-hidden="true"></i>
      </button>
      <div class="flex-left flex-wrap units-gap-big mt-4" style="display: none">
        <div class="unit unit-1-on-mobile flex-center">
          <figure>
            <img src="/static/blog/images/weixinpay.jpg" alt="微信支付收款二维码"
                 style="width: 250px">
            <figcaption class="text-center fs-6 mt-2" style="color: green">微信</figcaption>
          </figure>
        </div>
        <div class="unit unit-1-on-mobile flex-center">
          <figure>
            <img src="/static/blog/images/alipay.jpg" alt="支付宝收款二维码" style="width: 250px">
            <figcaption class="text-center fs-6 mt-2 text-primary">支付宝</figcaption>
          </figure>
        </div>
      </div>
    </div>
    <div class="post-tags">
      <ul class="list-inline">
        
      </ul>
    </div>
  </div>
</article>
  <div class="top-gap">
    <div class="jiathis_style">
      <span class="jiathis_txt">分享到：</span>
      <a class="jiathis_button_qzone">QQ空间</a>
      <a class="jiathis_button_tsina">新浪微博</a>
      <a class="jiathis_button_tqq">腾讯微博</a>
      <a class="jiathis_button_weixin">微信</a>
      <a href="http://www.jiathis.com/share?uid=2128865"
         class="jiathis jiathis_txt jiathis_separator jtico jtico_jiathis"
         target="_blank">更多</a>
      <a class="jiathis_counter_style"></a>
    </div>
    <script type="text/javascript">
        var jiathis_config = {data_track_clickback: 'true'};
    </script>
    <script type="text/javascript" src="http://v3.jiathis.com/code/jia.js?uid=2128865"
            charset="utf-8"></script>
    <!-- JiaThis Button END -->
  </div>
  <br>
  <div class="top-gap clearfix">
    
      <a href="8.html">
        <i class="fa fa-angle-double-left" aria-hidden="true"></i>
        真正的 Django 博客首页视图
      </a>
    
    
      <a class="float-right" href="10.html">
        博客文章详情页
        <i class="fa fa-angle-double-right" aria-hidden="true"></i>
      </a>
    
  </div>
  

  <section class="comment-area top-gap-big" id="comment-area">
    <h5>90 条评论 / 39 人参与</h5>
    
      
<div class="flex-center top-gap login-panel p-7">
  <div>
    <div class="text-muted text-center login-header"><span>登录后回复</span></div>
    <div class="flex-center text-center social-icons mt-3">
                        <span class="weibo mr-3">
                            <a href="/accounts/weibo/login/">
                                <i class="fa fa-weibo" aria-hidden="true"></i>
                            </a>
                        </span>
      <span class="github">
                            <a href="/accounts/github/login/">
                                <i class="fa fa-github" aria-hidden="true"></i>
                            </a>
                        </span>
    </div>
  </div>
</div>
    
    <div class="top-gap-big comment-list">
  
    <div class="flex-left py-4" id="c2323">
      <div class="unit-0">
        <img class="comment-avatar mr-3" src="https://avatars3.githubusercontent.com/u/34232453?v=4"/>
      </div>
      <div class="unit">
        <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">JonhoyChan
          
        </span>
    
  </header>
  <div class="comment-body">
    <p>博主你好，我觉得在设计数据库的时候，创建时间和修改时间可以用DateTimeField里的参数，比如：</p><p>created_time = models.DateTimeField(auto_now_add=True)</p><p>modified_time = models.DateTimeField(auto_now=True)<br></p><p>这样效果是不是会更好呢</p>
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">1 月前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/2323"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>
        
        <div class="comment-descendant-list">
          
        </div>
      </div>
    </div>
    
      <hr class="m-0">
    
  
    <div class="flex-left py-4" id="c2114">
      <div class="unit-0">
        <img class="comment-avatar mr-3" src="https://avatars2.githubusercontent.com/u/12111609?v=4"/>
      </div>
      <div class="unit">
        <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">量飞
          
        </span>
    
  </header>
  <div class="comment-body">
    <p><a href="https://github.com/django-admin-bootstrapped/django-admin-bootstrapped" rel="nofollow">https://github.com/django-admin-bootstrapped/django-admin-bootstrapped</a><br></p><p><a href="https://github.com/darklow/django-suit" rel="nofollow">https://github.com/darklow/django-suit</a><br></p><p><a href="https://github.com/sehmaschine/django-grappelli" rel="nofollow">https://github.com/sehmaschine/django-grappelli</a><br></p><p>可以使用上面三个库中的其中一个美化django-admin。</p>
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">3 月前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/2114"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>
        
        <div class="comment-descendant-list">
          
        </div>
      </div>
    </div>
    
      <hr class="m-0">
    
  
    <div class="flex-left py-4" id="c2078">
      <div class="unit-0">
        <img class="comment-avatar mr-3" src="https://avatars0.githubusercontent.com/u/8611744?v=4"/>
      </div>
      <div class="unit">
        <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">Arno Fan
          
        </span>
    
  </header>
  <div class="comment-body">
    <p>python2.x&nbsp; &nbsp;post提交报这个错误，有同学遇到吗？&nbsp; tag, category没有问题。</p><pre><code class="lang-bash">IntegrityError at /admin/blog/post/add/<br />(1452, 'Cannot add or update a child row: a foreign key constraint fails (`mysite`.`django_admin_log`, CONSTRAINT `django_admin_log_content_type_id_c4bce8eb_fk_django_co` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`))')<br></code></pre>
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">3 月，1 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/2078"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>
        
          <hr class="">
        
        <div class="comment-descendant-list">
          
            <div class="flex-left py-4" id="c2079">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="https://avatars0.githubusercontent.com/u/8611744?v=4"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">Arno Fan
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">Arno Fan
        

  </header>
  <div class="comment-body">
    <p>感觉自己踩到一个坑。&nbsp;</p><pre><code>./manage.py sqlmigrate admin 0001<br />BEGIN;<br />--<br />-- Create model LogEntry<br />--<br />CREATE TABLE `django_admin_log` (`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY, `action_time` datetime(6) NOT NULL, `object_id` longtext NULL, `object_repr` varchar(200) NOT NULL, `action_flag` smallint UNSIGNED NOT NULL, `change_message` longtext NOT NULL, `content_type_id` integer NULL, `user_id` integer NOT NULL);<br />ALTER TABLE `django_admin_log` ADD CONSTRAINT `django_admin_log_content_type_id_c4bce8eb_fk_django_co` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`);<br />ALTER TABLE `django_admin_log` ADD CONSTRAINT `django_admin_log_user_id_c564eba6_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`);<br />COMMIT;<br /><br></code></pre>
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">3 月，1 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/2079"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
              <hr class="m-0">
            
          
            <div class="flex-left py-4" id="c2080">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="https://avatars0.githubusercontent.com/u/8611744?v=4"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">Arno Fan
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">Arno Fan
        

  </header>
  <div class="comment-body">
    <blockquote><p>注：直接起了一个 python 3.6.4 的虚拟环境，提交没有问题。</p></blockquote>
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">3 月，1 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/2080"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
          
        </div>
      </div>
    </div>
    
      <hr class="m-0">
    
  
    <div class="flex-left py-4" id="c1992">
      <div class="unit-0">
        <img class="comment-avatar mr-3" src="https://avatars3.githubusercontent.com/u/33140097?v=4"/>
      </div>
      <div class="unit">
        <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">wgPython
          
        </span>
    
  </header>
  <div class="comment-body">
    <p>博主，问一下，比如我先建立好了Models模型类,同时也迁移插入好了数据，然后我想加几个字段，比如点击量，阅读量，评论数，还有是否删除等等这些，一直没有找到合适的方法，我就直接修改的数据库，sql语句手动添加的字段，请问django怎么新添加字段。</p><pre><code><br></code></pre>
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">3 月，3 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/1992"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>
        
          <hr class="">
        
        <div class="comment-descendant-list">
          
            <div class="flex-left py-4" id="c2009">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="https://avatars2.githubusercontent.com/u/13174219?v=4"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">追梦人物
          
            <span class="master">[博主]</span>
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">wgPython
        

  </header>
  <div class="comment-body">
    <p>在定义的 Model 类添加属性，然后运行那两条数据库迁移命令就可以了。</p>
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">3 月，3 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/2009"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
          
        </div>
      </div>
    </div>
    
      <hr class="m-0">
    
  
    <div class="flex-left py-4" id="c1927">
      <div class="unit-0">
        <img class="comment-avatar mr-3" src="http://tvax1.sinaimg.cn/crop.0.0.1080.1080.180/8776524dly8ffmj4fbea8j20u00u0dja.jpg"/>
      </div>
      <div class="unit">
        <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">叶小凯凯
          
        </span>
    
  </header>
  <div class="comment-body">
    <blockquote><ul><li><br></li></ul></blockquote>
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">4 月，1 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/1927"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>
        
        <div class="comment-descendant-list">
          
        </div>
      </div>
    </div>
    
      <hr class="m-0">
    
  
    <div class="flex-left py-4" id="c1569">
      <div class="unit-0">
        <img class="comment-avatar mr-3" src="http://tvax3.sinaimg.cn/crop.72.0.167.167.180/0060N6Yoly8fdkd1ki6naj308e04nglm.jpg"/>
      </div>
      <div class="unit">
        <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">Tove_cv
          
        </span>
    
  </header>
  <div class="comment-body">
    <pre><code># 本人新手一枚，如有错误请见谅。<br /># 今天我照着教程操作了一遍，结果在后台 &nbsp;( http://127.0.0.1:8000/admin/ ) 添加了文章后，<br /># 然后回到主页面 (127.0.0.1:8000) ，发现主页面没有显示 Post 的 body (博客正文)，<br /># 然后就发现在上一节的 index.html 里的代码里发现少了一行显示 body (博客正文)的代码：<br /># &lt;p&gt;{{ post.body }}&lt;/p&gt;</code></pre><pre><code># 我把它添加在 <br />/templates/blog/index.html<br />&lt;!-- 我觉得是少了一句： &lt;p&gt;{{ post.body }}&lt;/p&gt; --&gt;<br />&lt;div class="entry-content clearfix"&gt;<br />  &lt;p&gt;{{ post.body }}&lt;/p&gt;    <br />&nbsp;&nbsp;&lt;p&gt;{{ post.excerpt }}&lt;/p&gt;    <br />&nbsp;&nbsp;&lt;div class="read-more cl-effect-14"&gt;        <br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;a href="#" class="more-link"&gt;继续阅读 &lt;span class="meta-nav"&gt;→&lt;/span&gt;&lt;/a&gt;    <br />&nbsp;&nbsp;&lt;/div&gt;<br />&lt;/div&gt;</code></pre><pre><code><br></code></pre>
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">6 月前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/1569"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>
        
          <hr class="">
        
        <div class="comment-descendant-list">
          
            <div class="flex-left py-4" id="c2300">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="http://tva1.sinaimg.cn/crop.0.0.664.664.180/64130371jw8f3xb7qvoqjj20ig0igglj.jpg"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">Kenmin_Young
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">Tove_cv
        

  </header>
  <div class="comment-body">
    <p>主页上显示的是标题、分类、时间、摘要等一些文章基本信息，不显示body的内容，body要‘继续阅读’后才能看到</p>
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">1 月，1 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/2300"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
          
        </div>
      </div>
    </div>
    
      <hr class="m-0">
    
  
    <div class="flex-left py-4" id="c1545">
      <div class="unit-0">
        <img class="comment-avatar mr-3" src="http://tva3.sinaimg.cn/crop.0.0.180.180.180/6f9735dcjw8f3jdznrhp0j2050050q31.jpg"/>
      </div>
      <div class="unit">
        <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">阿潘尼
          
        </span>
    
  </header>
  <div class="comment-body">
    <p>找到原因了，在上个章节第一步修改blog/views.py，这一步忘记做了，修改后就正常了</p>
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">6 月，1 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/1545"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>
        
        <div class="comment-descendant-list">
          
        </div>
      </div>
    </div>
    
      <hr class="m-0">
    
  
    <div class="flex-left py-4" id="c1544">
      <div class="unit-0">
        <img class="comment-avatar mr-3" src="http://tva3.sinaimg.cn/crop.0.0.180.180.180/6f9735dcjw8f3jdznrhp0j2050050q31.jpg"/>
      </div>
      <div class="unit">
        <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">阿潘尼
          
        </span>
    
  </header>
  <div class="comment-body">
    <p>按步骤输入了几个测试数据进post，刷新index时总显示“暂时还没有发布的文章！”，不知道哪个步骤错了？</p>
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">6 月，1 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/1544"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>
        
        <div class="comment-descendant-list">
          
        </div>
      </div>
    </div>
    
      <hr class="m-0">
    
  
    <div class="flex-left py-4" id="c1381">
      <div class="unit-0">
        <img class="comment-avatar mr-3" src="https://avatars3.githubusercontent.com/u/31658250?v=4"/>
      </div>
      <div class="unit">
        <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">mamami
          
        </span>
    
  </header>
  <div class="comment-body">
    <p>找到原因了，PostAdmin没有注册</p>
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">6 月，4 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/1381"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>
        
        <div class="comment-descendant-list">
          
        </div>
      </div>
    </div>
    
      <hr class="m-0">
    
  
    <div class="flex-left py-4" id="c1380">
      <div class="unit-0">
        <img class="comment-avatar mr-3" src="https://avatars3.githubusercontent.com/u/31658250?v=4"/>
      </div>
      <div class="unit">
        <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">mamami
          
        </span>
    
  </header>
  <div class="comment-body">
    <p>我都设置了，但是没有显示，不知道错哪了</p>
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">6 月，4 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/1380"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>
        
        <div class="comment-descendant-list">
          
        </div>
      </div>
    </div>
    
      <hr class="m-0">
    
  
    <div class="flex-left py-4" id="c1346">
      <div class="unit-0">
        <img class="comment-avatar mr-3" src="https://avatars1.githubusercontent.com/u/16384951?v=4"/>
      </div>
      <div class="unit">
        <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">heidanchaofanhei
          
        </span>
    
  </header>
  <div class="comment-body">
    <p>博主，突然想起一个问题，就是我admin后台看到的Create time和Modified time 这两个字段的显示从哪来的？我记得编写models.py创建的字段是created_time和modified_time，那么后台显示是django默认显示的还是我哪一步操作得来的呢？谢谢啦</p>
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">7 月前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/1346"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>
        
          <hr class="">
        
        <div class="comment-descendant-list">
          
            <div class="flex-left py-4" id="c1351">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="https://avatars2.githubusercontent.com/u/13174219?v=4"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">追梦人物
          
            <span class="master">[博主]</span>
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">heidanchaofanhei
        

  </header>
  <div class="comment-body">
    <p>你在 admin 中定义了你要显示的字段：</p><pre><code>class PostAdmin(admin.ModelAdmin):<br />    list_display = ['title', 'created_time', 'modified_time', 'category', 'author']<br></code></pre>
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">7 月前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/1351"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
              <hr class="m-0">
            
          
            <div class="flex-left py-4" id="c1353">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="https://avatars1.githubusercontent.com/u/16384951?v=4"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">heidanchaofanhei
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">追梦人物
        
            <span class="master">[博主]</span>
        

  </header>
  <div class="comment-body">
    <p> list_display = ['title', 'created_time', 'modified_time', 'category', 'author']，这里面的字段是django系统默认就有的么？我好奇的是admin后台显示出来的跟我定义的字段名字大小写样式都不一样。<br></p>
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">7 月前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/1353"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
              <hr class="m-0">
            
          
            <div class="flex-left py-4" id="c1357">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="https://avatars2.githubusercontent.com/u/13174219?v=4"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">追梦人物
          
            <span class="master">[博主]</span>
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">heidanchaofanhei
        

  </header>
  <div class="comment-body">
    <p>django 对字段名做了一些美化处理，具体可以查看 admin 的文档或者看 admin 的代码就知道了。</p>
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">7 月前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/1357"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
          
        </div>
      </div>
    </div>
    
      <hr class="m-0">
    
  
    <div class="flex-left py-4" id="c1247">
      <div class="unit-0">
        <img class="comment-avatar mr-3" src="https://avatars0.githubusercontent.com/u/20641704?v=4"/>
      </div>
      <div class="unit">
        <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">LINDAZS
          
        </span>
    
  </header>
  <div class="comment-body">
    你说的media_root, 可以设置好路径保存图片, 之前做过一次展示图片, 在类里添加一个image的字段, 设置好上传的路径, 在设置项目的根目录下的urls, 把静态url添加上, 不然是找不到的,<br />settings.py<br />MEDIA_URL = '/media/'<br />MEDIA_ROOT = os.path.join(BASE_DIR, 'media').replace('\\','/')<br />urls.py<br />from django.conf.urls.static import static<br />from django.conf import settings<br /><br />最后加上, 就可以正常的拉起图片了.<br /> urlpatterns += static(settings.MEDIA_URL, document_root = settings.MEDIA_ROOT)
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">7 月，1 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/1247"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>
        
        <div class="comment-descendant-list">
          
        </div>
      </div>
    </div>
    
      <hr class="m-0">
    
  
    <div class="flex-left py-4" id="c1225">
      <div class="unit-0">
        <img class="comment-avatar mr-3" src="http://tvax3.sinaimg.cn/crop.0.291.711.711.180/61515747ly8fe3jeqf72sj20jy0zkjtg.jpg"/>
      </div>
      <div class="unit">
        <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">添翼leo老师
          
        </span>
    
  </header>
  <div class="comment-body">
    OperationalError at /practice/<br />no such table: blog_category<br />Request Method:	GET<br />Request URL:	http://127.0.0.1:8000/practice/<br />Django Version:	1.10.6<br />Exception Type:	OperationalError<br />Exception Value:	<br />no such table: blog_category<br />Exception Location:	C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\db\backends\sqlite3\base.py in execute, line 337<br />Python Executable:	C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\python.exe<br />Python Version:	3.6.1<br />Python Path:	<br />['E:\\passispn\\passispn\\passispn\\quiz',<br /> 'C:\\Users\\Administrator\\AppData\\Local\\Programs\\Python\\Python36-32\\python36.zip',<br /> 'C:\\Users\\Administrator\\AppData\\Local\\Programs\\Python\\Python36-32\\DLLs',<br /> 'C:\\Users\\Administrator\\AppData\\Local\\Programs\\Python\\Python36-32\\lib',<br /> 'C:\\Users\\Administrator\\AppData\\Local\\Programs\\Python\\Python36-32',<br /> 'C:\\Users\\Administrator\\AppData\\Local\\Programs\\Python\\Python36-32\\lib\\site-packages',<br /> 'C:\\Users\\Administrator\\AppData\\Local\\Programs\\Python\\Python36-32\\lib\\site-packages\\python_memcached-1.54-py3.6.egg',<br /> 'C:\\Users\\Administrator\\AppData\\Local\\Programs\\Python\\Python36-32\\lib\\site-packages\\odf',<br /> 'C:\\Users\\Administrator\\AppData\\Local\\Programs\\Python\\Python36-32\\lib\\site-packages\\odf',<br /> 'C:\\Users\\Administrator\\AppData\\Local\\Programs\\Python\\Python36-32\\lib\\site-packages\\odf',<br /> 'C:\\Users\\Administrator\\AppData\\Local\\Programs\\Python\\Python36-32\\lib\\site-packages\\odf',<br /> 'C:\\Users\\Administrator\\AppData\\Local\\Programs\\Python\\Python36-32\\lib\\site-packages\\odf',<br /> 'C:\\Users\\Administrator\\AppData\\Local\\Programs\\Python\\Python36-32\\lib\\site-packages\\odf',<br /> 'C:\\Users\\Administrator\\AppData\\Local\\Programs\\Python\\Python36-32\\lib\\site-packages\\odf']<br /><br />makemigrations<br />以及<br />migrate<br />命令都执行了 <br />为什么会出现这样的问题？谢谢
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">7 月，1 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/1225"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>
        
          <hr class="">
        
        <div class="comment-descendant-list">
          
            <div class="flex-left py-4" id="c1226">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="http://tvax3.sinaimg.cn/crop.0.291.711.711.180/61515747ly8fe3jeqf72sj20jy0zkjtg.jpg"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">添翼leo老师
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">添翼leo老师
        

  </header>
  <div class="comment-body">
    看网上的解决方案<br />删除 db.sqlite3之后<br />makemigrations 以及 migrate 就可以解决<br /><br />但是我的db.sqlite3 里面有很多的数据  不能删除 <br /><br />所以 不知道怎么办了 谢谢
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">7 月，1 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/1226"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
              <hr class="m-0">
            
          
            <div class="flex-left py-4" id="c1232">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="https://avatars2.githubusercontent.com/u/13174219?v=4"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">追梦人物
          
            <span class="master">[博主]</span>
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">添翼leo老师
        

  </header>
  <div class="comment-body">
    no such table: blog_category<br /><br />不知道你是否在哪一步出了错，让 django 误以为你已经生成了数据库表，但实际上没有。如果数据重要的话，最好不要乱动，以免使数据丢失。另外对于存在数据的项目，迁移数据库前**一定要备份！**
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">7 月，1 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/1232"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
              <hr class="m-0">
            
          
            <div class="flex-left py-4" id="c1233">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="http://tvax3.sinaimg.cn/crop.0.291.711.711.180/61515747ly8fe3jeqf72sj20jy0zkjtg.jpg"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">添翼leo老师
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">追梦人物
        
            <span class="master">[博主]</span>
        

  </header>
  <div class="comment-body">
    谢谢博主 <br /><br />数据 我已经备份了<br /><br />接下来 我应该怎么做呢？<br /><br />我都不知道要从哪里着手解决这个问题，谢谢
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">7 月，1 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/1233"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
              <hr class="m-0">
            
          
            <div class="flex-left py-4" id="c1236">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="https://avatars2.githubusercontent.com/u/13174219?v=4"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">追梦人物
          
            <span class="master">[博主]</span>
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">添翼leo老师
        

  </header>
  <div class="comment-body">
    删掉全部 migrations 文件和数据库，重新做一遍
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">7 月，1 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/1236"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
          
        </div>
      </div>
    </div>
    
      <hr class="m-0">
    
  
    <div class="flex-left py-4" id="c1169">
      <div class="unit-0">
        <img class="comment-avatar mr-3" src="http://tva1.sinaimg.cn/crop.0.323.1200.1200.180/0060CTlDjw8fb37uugz5vj30xc16c40w.jpg"/>
      </div>
      <div class="unit">
        <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">花重-城
          
        </span>
    
  </header>
  <div class="comment-body">
    博主，category 和tag 后台管理只显示category object ，和tag object123.。。需要怎么修改
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">7 月，1 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/1169"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>
        
          <hr class="">
        
        <div class="comment-descendant-list">
          
            <div class="flex-left py-4" id="c1180">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="https://avatars2.githubusercontent.com/u/13174219?v=4"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">追梦人物
          
            <span class="master">[博主]</span>
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">花重-城
        

  </header>
  <div class="comment-body">
    见之前关于 __str__ 方法的教程里的内容
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">7 月，1 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/1180"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
          
        </div>
      </div>
    </div>
    
      <hr class="m-0">
    
  
    <div class="flex-left py-4" id="c1163">
      <div class="unit-0">
        <img class="comment-avatar mr-3" src="http://tva1.sinaimg.cn/crop.0.323.1200.1200.180/0060CTlDjw8fb37uugz5vj30xc16c40w.jpg"/>
      </div>
      <div class="unit">
        <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">花重-城
          
        </span>
    
  </header>
  <div class="comment-body">
    OperationalError at /admin/blog/post/add/<br /><br />no such table: blog_category<br /><br />Request Method: 	GET<br />Request URL: 	http://127.0.0.1:8000/admin/blog/post/add/<br />Django Version: 	1.11.4<br />Exception Type: 	OperationalError<br />Exception Value: 	<br /><br />no such table: blog_category<br /><br />Exception Location: 	C:\Users\xin\AppData\Roaming\Python\Python36\site-packages\django\db\backends\sqlite3\base.py in execute, line 328<br />Python Executable: 	C:\Program Files\Python36\python.exe<br />Python Version: 	3.6.2<br />Python Path: 	<br /><br />['F:\\Sublime Text 3\\Sublime Text 3\\手动案例\\总结\\djangotest',<br /> 'C:\\Program Files\\Python36\\python36.zip',<br /> 'C:\\Program Files\\Python36\\DLLs',<br /> 'C:\\Program Files\\Python36\\lib',<br /> 'C:\\Program Files\\Python36',<br /> 'C:\\Users\\xin\\AppData\\Roaming\\Python\\Python36\\site-packages',<br /> 'C:\\Program Files\\Python36\\lib\\site-packages']<br /><br />Server time: 	星期日, 27 八月 2017 14:37:07 +0000<br /><br />没有跟着教程走虚拟环境，在<br />>>> from blog.models import Category, Tag, Post<br />>>> c = Category(name='category test')<br />>>> c.save()<br />>>> t = Tag(name='tag test')<br />>>> t.save()<br />c.save() 的时候就报错了，所以就直接创建的项目，别的地方都没问题，在这块点post后出现的错误，缺少表
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">7 月，1 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/1163"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>
        
          <hr class="">
        
        <div class="comment-descendant-list">
          
            <div class="flex-left py-4" id="c1168">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="http://tva1.sinaimg.cn/crop.0.323.1200.1200.180/0060CTlDjw8fb37uugz5vj30xc16c40w.jpg"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">花重-城
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">花重-城
        

  </header>
  <div class="comment-body">
    解决了，数据库创建表后没有同步，报错缺少那个表
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">7 月，1 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/1168"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
          
        </div>
      </div>
    </div>
    
      <hr class="m-0">
    
  
    <div class="flex-left py-4" id="c1144">
      <div class="unit-0">
        <img class="comment-avatar mr-3" src="https://avatars1.githubusercontent.com/u/20945523?v=4"/>
      </div>
      <div class="unit">
        <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">leonfrank
          
        </span>
    
  </header>
  <div class="comment-body">
    博主，我想问几个问题<br />1. 我发布的文章有保存到哪个文件吗？可以在哪个目录下找到<br />2. 文章里可以有插入图片操作吗，图片要上传到哪个目录<br />3. 我在网上看到的别的介绍里说可以配置media_root这一项来保存数据文件，这个怎么用<br />4. 网站可以有注册功能吗，怎么实现
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">7 月，2 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/1144"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>
        
          <hr class="">
        
        <div class="comment-descendant-list">
          
            <div class="flex-left py-4" id="c1151">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="https://avatars2.githubusercontent.com/u/13174219?v=4"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">追梦人物
          
            <span class="master">[博主]</span>
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">leonfrank
        

  </header>
  <div class="comment-body">
    1. 保存在数据库中，你可以在 xx.sqlite3 文件中找到<br />2. 教程中不支持，但可以采用 markdown 的方式替代实现<br />3. 比较复杂，可以自行研究文档：https://docs.djangoproject.com/en/1.10/topics/files/<br />4. 见我的另一个教程，Django 用户注册系统：http://zmrenwu.com/category/django-auth-example/
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">7 月，1 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/1151"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
          
        </div>
      </div>
    </div>
    
      <hr class="m-0">
    
  
    <div class="flex-left py-4" id="c938">
      <div class="unit-0">
        <img class="comment-avatar mr-3" src="http://tva1.sinaimg.cn/crop.0.0.180.180.180/4b41e46djw1e8qgp5bmzyj2050050aa8.jpg"/>
      </div>
      <div class="unit">
        <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">nice粉条
          
        </span>
    
  </header>
  <div class="comment-body">
    list_display = ['title', 'created_time', 'modified_time', 'category', 'author'] 博主，这种在后台的展示可以设置别名么 例如 展示的时候显示 “标题”，“创建时间” 有什么方法么 我看 list_display的方法为 返回字段 ‘__str__’
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">8 月前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/938"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>
        
          <hr class="">
        
        <div class="comment-descendant-list">
          
            <div class="flex-left py-4" id="c957">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="https://avatars2.githubusercontent.com/u/13174219?v=4"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">追梦人物
          
            <span class="master">[博主]</span>
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">nice粉条
        

  </header>
  <div class="comment-body">
    这个还真没有研究过，可以查查 admin 的文档。
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">8 月前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/957"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
              <hr class="m-0">
            
          
            <div class="flex-left py-4" id="c1192">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="https://avatars2.githubusercontent.com/u/6622967?v=4"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">Hogantry
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">nice粉条
        

  </header>
  <div class="comment-body">
    title = models.CharField(max_length=70, verbose_name='标题')<br />加个verbose_name属性就好了
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">7 月，1 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/1192"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
          
        </div>
      </div>
    </div>
    
      <hr class="m-0">
    
  
    <div class="flex-left py-4" id="c933">
      <div class="unit-0">
        <img class="comment-avatar mr-3" src="http://tva3.sinaimg.cn/crop.0.1.750.750.180/b6915e06jw8erwrq8wv7fj20ku0kwgmc.jpg"/>
      </div>
      <div class="unit">
        <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">米粥fly怕素色pool
          
        </span>
    
  </header>
  <div class="comment-body">
    你好，博主 这啥情况？<br />OperationalError at /admin/blog/post/add/<br />no such table: blog_post<br />Request Method:	POST<br />Request URL:	http://127.0.0.1:8000/admin/blog/post/add/<br />Django Version:	1.11.3<br />Exception Type:	OperationalError<br />Exception Value:	<br />no such table: blog_post<br />Exception Location:	/home/leodowhat/.pyenv/versions/test/lib/python3.6/site -packages/django/db/backends/sqlite3/base.py in execute, line 328
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">8 月前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/933"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>
        
          <hr class="">
        
        <div class="comment-descendant-list">
          
            <div class="flex-left py-4" id="c937">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="https://avatars2.githubusercontent.com/u/13174219?v=4"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">追梦人物
          
            <span class="master">[博主]</span>
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">米粥fly怕素色pool
        

  </header>
  <div class="comment-body">
    运行 python manage.py makemigrations 和 migrate 么？具体见前边的几篇教程。
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">8 月前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/937"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
          
        </div>
      </div>
    </div>
    
      <hr class="m-0">
    
  
    <div class="flex-left py-4" id="c824">
      <div class="unit-0">
        <img class="comment-avatar mr-3" src="http://tva2.sinaimg.cn/crop.281.0.716.716.180/92f9a087gw1f2rvr5swo7j20zk0k00vy.jpg"/>
      </div>
      <div class="unit">
        <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">世事可否有转机
          
        </span>
    
  </header>
  <div class="comment-body">
    你好，请问博主，我post了，还是显示暂时未发布文章，检查了index.html，应该没问题呀。
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">8 月，2 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/824"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>
        
          <hr class="">
        
        <div class="comment-descendant-list">
          
            <div class="flex-left py-4" id="c825">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="http://tva2.sinaimg.cn/crop.281.0.716.716.180/92f9a087gw1f2rvr5swo7j20zk0k00vy.jpg"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">世事可否有转机
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">世事可否有转机
        

  </header>
  <div class="comment-body">
    已经解决，修改了views.py
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">8 月，2 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/825"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
              <hr class="m-0">
            
          
            <div class="flex-left py-4" id="c1490">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="http://tva3.sinaimg.cn/crop.0.0.744.744.180/b70c7212jw8f6kgi0vcoaj20ko0ko3ym.jpg"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">某王府偷狗大盗
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">世事可否有转机
        

  </header>
  <div class="comment-body">
    <p style="">可以请问一下你是如何修改的吗？我也遇到了类似的问题<br></p>
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">6 月，2 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/1490"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
          
        </div>
      </div>
    </div>
    
      <hr class="m-0">
    
  
    <div class="flex-left py-4" id="c822">
      <div class="unit-0">
        <img class="comment-avatar mr-3" src="http://tva4.sinaimg.cn/crop.196.38.983.983.180/62a21376gw1f6re6dvtmej20zk0sgjys.jpg"/>
      </div>
      <div class="unit">
        <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">恠往逺方
          
        </span>
    
  </header>
  <div class="comment-body">
    楼主，还有个问题我用的是python2.7+Django1.11.3在后台管理中添加中文的时候报错，1.11.3是不能添加中文的吗？
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">8 月，2 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/822"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>
        
          <hr class="">
        
        <div class="comment-descendant-list">
          
            <div class="flex-left py-4" id="c823">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="https://avatars2.githubusercontent.com/u/13174219?v=4"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">追梦人物
          
            <span class="master">[博主]</span>
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">恠往逺方
        

  </header>
  <div class="comment-body">
    可以的，这可能是 py2 的编码问题，按照错误提示修复一下编码应该就行了。
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">8 月，2 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/823"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
          
        </div>
      </div>
    </div>
    
      <hr class="m-0">
    
  
    <div class="flex-left py-4" id="c815">
      <div class="unit-0">
        <img class="comment-avatar mr-3" src="http://tva4.sinaimg.cn/crop.196.38.983.983.180/62a21376gw1f6re6dvtmej20zk0sgjys.jpg"/>
      </div>
      <div class="unit">
        <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">恠往逺方
          
        </span>
    
  </header>
  <div class="comment-body">
    楼主，为什么我的后台显示里面没有那三个注册的模块啊？
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">8 月，2 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/815"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>
        
          <hr class="">
        
        <div class="comment-descendant-list">
          
            <div class="flex-left py-4" id="c821">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="http://tva4.sinaimg.cn/crop.196.38.983.983.180/62a21376gw1f6re6dvtmej20zk0sgjys.jpg"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">恠往逺方
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">恠往逺方
        

  </header>
  <div class="comment-body">
    已经解决了，没有用admin.site.register()函数
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">8 月，2 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/821"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
          
        </div>
      </div>
    </div>
    
      <hr class="m-0">
    
  
    <div class="flex-left py-4" id="c765">
      <div class="unit-0">
        <img class="comment-avatar mr-3" src="http://tva2.sinaimg.cn/crop.0.0.146.146.180/671bf60bgw1ealjdjydxnj204304e0sr.jpg"/>
      </div>
      <div class="unit">
        <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">杰木四水
          
        </span>
    
  </header>
  <div class="comment-body">
    希望有时间能详细写写定制后台的文章，感谢你的文章。
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">8 月，3 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/765"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>
        
          <hr class="">
        
        <div class="comment-descendant-list">
          
            <div class="flex-left py-4" id="c768">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="https://avatars2.githubusercontent.com/u/13174219?v=4"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">追梦人物
          
            <span class="master">[博主]</span>
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">杰木四水
        

  </header>
  <div class="comment-body">
    这在官方文档的 tutorial 中有详细示例，我就不重复了。
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">8 月，2 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/768"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
          
        </div>
      </div>
    </div>
    
      <hr class="m-0">
    
  
    <div class="flex-left py-4" id="c606">
      <div class="unit-0">
        <img class="comment-avatar mr-3" src="http://tva2.sinaimg.cn/crop.0.0.180.180.180/4f951c40jw1e8qgp5bmzyj2050050aa8.jpg"/>
      </div>
      <div class="unit">
        <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">小朩头人
          
        </span>
    
  </header>
  <div class="comment-body">
    请教下，输出显示的文章 与原输入不匹配；主要是回车/换行差异太大。是不是存的时候data写入表，显示时读data，造成的？
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">9 月，1 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/606"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>
        
          <hr class="">
        
        <div class="comment-descendant-list">
          
            <div class="flex-left py-4" id="c607">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="https://avatars2.githubusercontent.com/u/13174219?v=4"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">追梦人物
          
            <span class="master">[博主]</span>
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">小朩头人
        

  </header>
  <div class="comment-body">
    html 会将任何回车，多个空格替换为 1 个空格。解决方案是使用 Markdown 或者手动加入 br 换行。
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">9 月，1 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/607"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
          
        </div>
      </div>
    </div>
    
      <hr class="m-0">
    
  
    <div class="flex-left py-4" id="c525">
      <div class="unit-0">
        <img class="comment-avatar mr-3" src="http://tva3.sinaimg.cn/crop.154.0.324.324.180/aae2d2ecgw1ejvu9bmctqj20f00dmwet.jpg"/>
      </div>
      <div class="unit">
        <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">让你懂事让你乖
          
        </span>
    
  </header>
  <div class="comment-body">
    楼主，我在admin的post列表页，Category这一列下的值都为Category object而不是你图上所示的分类测试，请问是哪里出了问题
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">9 月，2 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/525"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>
        
          <hr class="">
        
        <div class="comment-descendant-list">
          
            <div class="flex-left py-4" id="c526">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="https://avatars2.githubusercontent.com/u/13174219?v=4"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">追梦人物
          
            <span class="master">[博主]</span>
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">让你懂事让你乖
        

  </header>
  <div class="comment-body">
    添加 str 方法，具体见这篇教程 http://zmrenwu.com/post/6
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">9 月，2 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/526"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
          
        </div>
      </div>
    </div>
    
      <hr class="m-0">
    
  
    <div class="flex-left py-4" id="c512">
      <div class="unit-0">
        <img class="comment-avatar mr-3" src="https://avatars3.githubusercontent.com/u/21060947?v=3"/>
      </div>
      <div class="unit">
        <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">abulimity
          
        </span>
    
  </header>
  <div class="comment-body">
    请教一下楼主哇<br />在后台添加Post的时候报错了  文章title是《第一篇文章》<br />"<Post: 第一篇文章>" needs to have a value for field "id" before this many-to-many relationship can be used.<br />是没有自动生成pk吗？
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">9 月，2 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/512"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>
        
          <hr class="">
        
        <div class="comment-descendant-list">
          
            <div class="flex-left py-4" id="c520">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="https://avatars2.githubusercontent.com/u/13174219?v=4"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">追梦人物
          
            <span class="master">[博主]</span>
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">abulimity
        

  </header>
  <div class="comment-body">
    需要相关代码才能确定问题，从描述来看可能是保存了多对多的数据。
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">9 月，2 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/520"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
          
        </div>
      </div>
    </div>
    
      <hr class="m-0">
    
  
    <div class="flex-left py-4" id="c511">
      <div class="unit-0">
        <img class="comment-avatar mr-3" src="https://avatars3.githubusercontent.com/u/21060947?v=3"/>
      </div>
      <div class="unit">
        <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">abulimity
          
        </span>
    
  </header>
  <div class="comment-body">
    请问每个app对应一个admin还是一个admin可以管理所有app
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">9 月，2 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/511"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>
        
          <hr class="">
        
        <div class="comment-descendant-list">
          
            <div class="flex-left py-4" id="c519">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="https://avatars2.githubusercontent.com/u/13174219?v=4"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">追梦人物
          
            <span class="master">[博主]</span>
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">abulimity
        

  </header>
  <div class="comment-body">
    每个 app 下都有一个 admin 文件，admin 相关的代码需要放在这里面。
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">9 月，2 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/519"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
          
        </div>
      </div>
    </div>
    
      <hr class="m-0">
    
  
    <div class="flex-left py-4" id="c496">
      <div class="unit-0">
        <img class="comment-avatar mr-3" src="https://avatars3.githubusercontent.com/u/8360241?v=3"/>
      </div>
      <div class="unit">
        <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">wlz
          
        </span>
    
  </header>
  <div class="comment-body">
    在添加完Post后，输入 http://127.0.0.1:8000/ 打开不是文章列表，还是显示<br />“欢迎访问我的博客首页” ，是不是还需要修改某个地方？？
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">9 月，3 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/496"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>
        
          <hr class="">
        
        <div class="comment-descendant-list">
          
            <div class="flex-left py-4" id="c497">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="https://avatars2.githubusercontent.com/u/13174219?v=4"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">追梦人物
          
            <span class="master">[博主]</span>
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">wlz
        

  </header>
  <div class="comment-body">
    修改 index 模板。
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">9 月，3 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/497"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
              <hr class="m-0">
            
          
            <div class="flex-left py-4" id="c499">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="https://avatars3.githubusercontent.com/u/8360241?v=3"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">wlz
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">追梦人物
        
            <span class="master">[博主]</span>
        

  </header>
  <div class="comment-body">
    嗯
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">9 月，3 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/499"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
          
        </div>
      </div>
    </div>
    
      <hr class="m-0">
    
  
    <div class="flex-left py-4" id="c477">
      <div class="unit-0">
        <img class="comment-avatar mr-3" src="https://avatars2.githubusercontent.com/u/26523367?v=3"/>
      </div>
      <div class="unit">
        <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">chen@hy
          
        </span>
    
  </header>
  <div class="comment-body">
    请教一下博主，其他都正常，就是create time和modified time不显示内容，主页上文章的创建时间也不显示，也并没有报错，这是为什么呢？
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">9 月，3 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/477"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>
        
          <hr class="">
        
        <div class="comment-descendant-list">
          
            <div class="flex-left py-4" id="c478">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="https://avatars2.githubusercontent.com/u/13174219?v=4"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">追梦人物
          
            <span class="master">[博主]</span>
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">chen@hy
        

  </header>
  <div class="comment-body">
    看下 model 代码
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">9 月，3 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/478"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
              <hr class="m-0">
            
          
            <div class="flex-left py-4" id="c479">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="https://avatars2.githubusercontent.com/u/26523367?v=3"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">chen@hy
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">追梦人物
        
            <span class="master">[博主]</span>
        

  </header>
  <div class="comment-body">
    models里面是：create_time=models.DateTimeField()<br />	                     modified_time=models.DateTimeField()<br />index.html里是： <span class="post-date"><a href="#"><time                 class="entry-date"<br />                                datetime="{{ post.create_time }}">{{ post.create_time }}</time></a>
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">9 月，3 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/479"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
              <hr class="m-0">
            
          
            <div class="flex-left py-4" id="c480">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="https://avatars2.githubusercontent.com/u/13174219?v=4"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">追梦人物
          
            <span class="master">[博主]</span>
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">chen@hy
        

  </header>
  <div class="comment-body">
    可能是你在后台没有设置值？不过这样后台应该不允许你保存文章的。
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">9 月，3 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/480"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
              <hr class="m-0">
            
          
            <div class="flex-left py-4" id="c481">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="https://avatars2.githubusercontent.com/u/26523367?v=3"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">chen@hy
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">追梦人物
        
            <span class="master">[博主]</span>
        

  </header>
  <div class="comment-body">
    models里面是：create_time=models.DateTimeField()<br />	                     modified_time=models.DateTimeField()<br />index.html里是： <span class="post-date"><a href="#"><time                      <br />                                class="entry-date"<br />                                datetime="{{ post.create_time }}">{{ post.create_time }} <br />                              </time></a><br />views里是：post_list=Post.objects.all().order_by('-create_time')<br />admin里是：list_display=['title', 'create_time', 'modified_time', 'category', 'author']<br />相关的应该就是这几条吧
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">9 月，3 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/481"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
              <hr class="m-0">
            
          
            <div class="flex-left py-4" id="c482">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="https://avatars2.githubusercontent.com/u/26523367?v=3"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">chen@hy
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">chen@hy
        

  </header>
  <div class="comment-body">
    多点了一下。。。
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">9 月，3 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/482"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
              <hr class="m-0">
            
          
            <div class="flex-left py-4" id="c483">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="https://avatars2.githubusercontent.com/u/13174219?v=4"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">追梦人物
          
            <span class="master">[博主]</span>
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">chen@hy
        

  </header>
  <div class="comment-body">
    和 admin 设置无关，你在后台的文章表单没有设置时间选项么？
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">9 月，3 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/483"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
              <hr class="m-0">
            
          
            <div class="flex-left py-4" id="c484">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="https://avatars2.githubusercontent.com/u/26523367?v=3"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">chen@hy
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">追梦人物
        
            <span class="master">[博主]</span>
        

  </header>
  <div class="comment-body">
    是指在创建和修改post的时候么，有时间选项，填的时候也有内容，但回到post界面和主页时候时间就不显示了
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">9 月，3 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/484"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
              <hr class="m-0">
            
          
            <div class="flex-left py-4" id="c485">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="https://avatars2.githubusercontent.com/u/13174219?v=4"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">追梦人物
          
            <span class="master">[博主]</span>
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">chen@hy
        

  </header>
  <div class="comment-body">
    那就不知道了，可能是数据库问题？Mysql？
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">9 月，3 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/485"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
              <hr class="m-0">
            
          
            <div class="flex-left py-4" id="c2335">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="http://tva4.sinaimg.cn/crop.0.0.498.498.180/0069M2j5jw8f1rtubyjnkj30du0du3zd.jpg"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">无头骑士Derek
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">chen@hy
        

  </header>
  <div class="comment-body">
    <p>一样的问题，请问你解决了吗</p>
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">1 月前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/2335"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
          
        </div>
      </div>
    </div>
    
      <hr class="m-0">
    
  
    <div class="flex-left py-4" id="c462">
      <div class="unit-0">
        <img class="comment-avatar mr-3" src="https://avatars0.githubusercontent.com/u/17109866?v=3"/>
      </div>
      <div class="unit">
        <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">XFeng7
          
        </span>
    
  </header>
  <div class="comment-body">
    请问这个问题怎么解决呀？头皮发麻。。。。<br />Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x000001FC9F8881E0><br />Traceback (most recent call last):<br />  File "D:\new_start\blogproject_env\lib\site-packages\django\utils\autoreload.py", line 226, in wrapper<br />    fn(*args, **kwargs)<br />  File "D:\new_start\blogproject_env\lib\site-packages\django\core\management\commands\runserver.py", line 121, in inner_run<br />    self.check(display_num_errors=True)<br />  File "D:\new_start\blogproject_env\lib\site-packages\django\core\management\base.py", line 420, in check<br />    raise SystemCheckError(msg)<br />django.core.management.base.SystemCheckError: SystemCheckError: System check identified some issues:<br /><br />ERRORS:<br /><class 'blog.admin.PostAdmin'>: (admin.E108) The value of 'list_display[3]' refers to 'category', which is not a callable, an attribute of 'PostAdmin', or an attribute or method on 'blog.Post'.<br /><br />System check identified 1 issue (0 silenced).
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">9 月，3 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/462"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>
        
          <hr class="">
        
        <div class="comment-descendant-list">
          
            <div class="flex-left py-4" id="c463">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="https://avatars0.githubusercontent.com/u/17109866?v=3"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">XFeng7
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">XFeng7
        

  </header>
  <div class="comment-body">
    解决了，谢谢博主的文章。：D
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">9 月，3 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/463"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
              <hr class="m-0">
            
          
            <div class="flex-left py-4" id="c1754">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="https://avatars1.githubusercontent.com/u/12559901?v=4"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">zy410692
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">XFeng7
        

  </header>
  <div class="comment-body">
    <p>怎么解决的？？</p>
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">5 月前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/1754"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
              <hr class="m-0">
            
          
            <div class="flex-left py-4" id="c2377">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="https://avatars1.githubusercontent.com/u/33307808?v=4"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">rex.wang
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">zy410692
        

  </header>
  <div class="comment-body">
    <p>你试试检查一下你的，list里的拼写</p>
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">2 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/2377"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
          
        </div>
      </div>
    </div>
    
      <hr class="m-0">
    
  
    <div class="flex-left py-4" id="c412">
      <div class="unit-0">
        <img class="comment-avatar mr-3" src="https://avatars2.githubusercontent.com/u/16892902?v=3"/>
      </div>
      <div class="unit">
        <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">benq1211
          
        </span>
    
  </header>
  <div class="comment-body">
    post在管理界面添加后，显示没有name字段<br />AttributeError at /admin/blog/post/add/<br />'Post' object has no attribute 'name'<br />Request Method:	POST<br />Request URL:	http://192.168.1.217:8000/admin/blog/post/add/<br />Django Version:	1.10.5<br />Exception Type:	AttributeError<br />Exception Value:	<br />'Post' object has no attribute 'name'<br />Exception Location:	/mnt/siteone/blog/models.py in __str__, line 35<br />Python Executable:	/root/.pyenv/versions/magedu/bin/python<br />Python Version:	3.5.2<br />Python Path:	<br />['/mnt/siteone',<br /> '/root/.pyenv/versions/3.5.2/lib/python35.zip',<br /> '/root/.pyenv/versions/3.5.2/lib/python3.5',<br /> '/root/.pyenv/versions/3.5.2/lib/python3.5/plat-linux',<br /> '/root/.pyenv/versions/3.5.2/lib/python3.5/lib-dynload',<br /> '/root/.pyenv/versions/magedu/lib/python3.5/site-packages']<br />Server time:	星期三, 14 六月 2017 13:57:34 +0800
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">9 月，3 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/412"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>
        
          <hr class="">
        
        <div class="comment-descendant-list">
          
            <div class="flex-left py-4" id="c414">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="https://avatars2.githubusercontent.com/u/13174219?v=4"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">追梦人物
          
            <span class="master">[博主]</span>
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">benq1211
        

  </header>
  <div class="comment-body">
    去掉 str 方法中的 name
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">9 月，3 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/414"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
              <hr class="m-0">
            
          
            <div class="flex-left py-4" id="c415">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="https://avatars2.githubusercontent.com/u/16892902?v=3"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">benq1211
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">追梦人物
        
            <span class="master">[博主]</span>
        

  </header>
  <div class="comment-body">
    谢谢，我直接返回title了
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">9 月，3 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/415"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
          
        </div>
      </div>
    </div>
    
      <hr class="m-0">
    
  
    <div class="flex-left py-4" id="c407">
      <div class="unit-0">
        <img class="comment-avatar mr-3" src="https://avatars1.githubusercontent.com/u/26498437?v=4"/>
      </div>
      <div class="unit">
        <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">huapc
          
        </span>
    
  </header>
  <div class="comment-body">
    请问访问http://127.0.0.1:8000/admin/ 会出现如下错误<br />A server error occurred.  Please contact the administrator.是怎么回事？
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">9 月，4 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/407"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>
        
          <hr class="">
        
        <div class="comment-descendant-list">
          
            <div class="flex-left py-4" id="c408">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="https://avatars2.githubusercontent.com/u/13174219?v=4"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">追梦人物
          
            <span class="master">[博主]</span>
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">huapc
        

  </header>
  <div class="comment-body">
    关了代理软件等。
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">9 月，3 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/408"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
              <hr class="m-0">
            
          
            <div class="flex-left py-4" id="c443">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="https://avatars1.githubusercontent.com/u/26498437?v=4"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">huapc
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">追梦人物
        
            <span class="master">[博主]</span>
        

  </header>
  <div class="comment-body">
    谢谢！已解决，是时区写错了，不能正确识别
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">9 月，3 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/443"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
          
        </div>
      </div>
    </div>
    
      <hr class="m-0">
    
  
    <div class="flex-left py-4" id="c346">
      <div class="unit-0">
        <img class="comment-avatar mr-3" src="http://tva2.sinaimg.cn/crop.0.0.996.996.180/6abed94djw8eyx1sfebifj20ro0roq6q.jpg"/>
      </div>
      <div class="unit">
        <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">仗剑踏歌行_Hung
          
        </span>
    
  </header>
  <div class="comment-body">
    访问 http://127.0.0.1:8000/admin/ 会出现如下错误。。。。求解 谢谢T__T<br />Page not found (404)<br />Request Method:	GET<br />Request URL:	http://127.0.0.1:8000/admin/<br />Using the URLconf defined in blogproject.urls, Django tried these URL patterns, in this order:<br />^$ [name='index']<br />The current URL, admin/, didn't match any of these.<br />You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 404 page.
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">10 月前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/346"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>
        
          <hr class="">
        
        <div class="comment-descendant-list">
          
            <div class="flex-left py-4" id="c348">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="http://tva2.sinaimg.cn/crop.0.0.996.996.180/6abed94djw8eyx1sfebifj20ro0roq6q.jpg"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">仗剑踏歌行_Hung
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">仗剑踏歌行_Hung
        

  </header>
  <div class="comment-body">
    已解决。。。。我之前把 在blogproject/urls.py里的这行给注释掉了<br />#url(r'^admin/', admin.site.urls)。 改回来就好了。。。
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">10 月前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/348"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
          
        </div>
      </div>
    </div>
    
      <hr class="m-0">
    
  
    <div class="flex-left py-4" id="c161">
      <div class="unit-0">
        <img class="comment-avatar mr-3" src="https://avatars1.githubusercontent.com/u/28527786?v=3"/>
      </div>
      <div class="unit">
        <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">liuchengfei
          
        </span>
    
  </header>
  <div class="comment-body">
    访问 http://127.0.0.1:8000/ 首页<br />环境：python3.4,django1.10  <br />报错如下：<br /><br />Page not found (404)<br />Request Method: 	GET<br />Request URL: 	http://127.0.0.1:8000/index.html<br /><br />Using the URLconf defined in blogproject.urls, Django tried these URL patterns, in this order:<br /><br />    ^admin/<br />    ^$ [name='index']<br /><br />The current URL, index.html, didn't match any of these.
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">10 月，2 周前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/161"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>
        
          <hr class="">
        
        <div class="comment-descendant-list">
          
            <div class="flex-left py-4" id="c279">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="http://tva4.sinaimg.cn/crop.0.0.180.180.180/aaf6bf66jw1e8qgp5bmzyj2050050aa8.jpg"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">夹缝中难以生存
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">liuchengfei
        

  </header>
  <div class="comment-body">
    找到解决的方法了么？
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">10 月前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/279"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
              <hr class="m-0">
            
          
            <div class="flex-left py-4" id="c280">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="https://avatars1.githubusercontent.com/u/28527786?v=3"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">liuchengfei
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">夹缝中难以生存
        

  </header>
  <div class="comment-body">
    不要输入index.html
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">10 月前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/280"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
              <hr class="m-0">
            
          
            <div class="flex-left py-4" id="c282">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="http://tva4.sinaimg.cn/crop.0.0.180.180.180/aaf6bf66jw1e8qgp5bmzyj2050050aa8.jpg"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">夹缝中难以生存
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">liuchengfei
        

  </header>
  <div class="comment-body">
    好的谢谢。<br />我是urls.py里面一行代码注释了。
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">10 月前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/282"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
              <hr class="m-0">
            
          
            <div class="flex-left py-4" id="c334">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="https://avatars3.githubusercontent.com/u/29302107?v=3"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">jyzdream
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">liuchengfei
        

  </header>
  <div class="comment-body">
    你好，我也遇到这个问题，请问不要输入index.html是什么意思？
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">10 月前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/334"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
              <hr class="m-0">
            
          
            <div class="flex-left py-4" id="c335">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="https://avatars2.githubusercontent.com/u/13174219?v=4"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">追梦人物
          
            <span class="master">[博主]</span>
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">jyzdream
        

  </header>
  <div class="comment-body">
    就是不要去掉域名后 .html
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">10 月前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/335"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
              <hr class="m-0">
            
          
            <div class="flex-left py-4" id="c345">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="http://tva2.sinaimg.cn/crop.0.0.996.996.180/6abed94djw8eyx1sfebifj20ro0roq6q.jpg"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">仗剑踏歌行_Hung
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">追梦人物
        
            <span class="master">[博主]</span>
        

  </header>
  <div class="comment-body">
    不好意思 我也是卡在这里， 还是没有看明白您的解释T__T
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">10 月前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/345"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
              <hr class="m-0">
            
          
            <div class="flex-left py-4" id="c347">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="http://tva2.sinaimg.cn/crop.0.0.996.996.180/6abed94djw8eyx1sfebifj20ro0roq6q.jpg"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">仗剑踏歌行_Hung
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">追梦人物
        
            <span class="master">[博主]</span>
        

  </header>
  <div class="comment-body">
    已解决 谢谢
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">10 月前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/347"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
          
        </div>
      </div>
    </div>
    
      <hr class="m-0">
    
  
    <div class="flex-left py-4" id="c68">
      <div class="unit-0">
        <img class="comment-avatar mr-3" src="http://tva1.sinaimg.cn/crop.0.0.800.800.180/e3811d83jw8ehvzljofoyj20m80m8jsl.jpg"/>
      </div>
      <div class="unit">
        <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">我是单永旭
          
        </span>
    
  </header>
  <div class="comment-body">
    博主,在美化 admin 后台的时候,注册了PostAdmin之后,刷新网页没效果可能是什么原因呢?python3.4,django1.10
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">11 月前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/68"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>
        
          <hr class="">
        
        <div class="comment-descendant-list">
          
            <div class="flex-left py-4" id="c69">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="https://avatars2.githubusercontent.com/u/13174219?v=4"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">追梦人物
          
            <span class="master">[博主]</span>
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">我是单永旭
        

  </header>
  <div class="comment-body">
    重启一下开发服务器试试？需要看一下你的注册代码是否有误？
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">11 月前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/69"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
              <hr class="m-0">
            
          
            <div class="flex-left py-4" id="c2336">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="http://tva4.sinaimg.cn/crop.0.0.498.498.180/0069M2j5jw8f1rtubyjnkj30du0du3zd.jpg"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">无头骑士Derek
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">我是单永旭
        

  </header>
  <div class="comment-body">
    <p>我也遇到这个问题了，请问你解决了吗</p>
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">1 月前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/2336"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
          
        </div>
      </div>
    </div>
    
      <hr class="m-0">
    
  
    <div class="flex-left py-4" id="c36">
      <div class="unit-0">
        <img class="comment-avatar mr-3" src="https://avatars1.githubusercontent.com/u/26848875?v=3"/>
      </div>
      <div class="unit">
        <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">tianjigor
          
        </span>
    
  </header>
  <div class="comment-body">
    我是用py2.7的，直接写中文保存会报'ascii' codec can't encode characters in position 0-1: ordinal not in range(128)，在admin.py加上<br />import sys<br />reload(sys)<br />sys.setdefaultencoding("utf8")<br />才OK，估计py3没这个问题出现
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">11 月前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/36"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>
        
          <hr class="">
        
        <div class="comment-descendant-list">
          
            <div class="flex-left py-4" id="c67">
              <div class="unit-0">
                <img class="comment-avatar mr-3" src="http://tva1.sinaimg.cn/crop.0.0.800.800.180/e3811d83jw8ehvzljofoyj20m80m8jsl.jpg"/>
              </div>
              <div class="unit">
                
  <div class="comment-main">
  <header class="comment-user">
        <span class="text-small text-muted nickname">我是单永旭
          
        </span>
    
    <span class="reply-label text-small text-muted">
                                                        <i class="fa fa-share" aria-hidden="true"></i>
                                                    </span>
    <span class="nickname text-small text-muted">tianjigor
        

  </header>
  <div class="comment-body">
    python貌似在用中文的时候应该要在第一行写上#coding:utf-8
  </div>
  <footer class="comment-footer flex-left">
    <ul class="unit list-inline dot-divider">
      <li class="list-inline-item">
        <time class="text-small text-muted">11 月前</time>
      </li>
      <li class="list-inline-item">
        <a href="/comments/reply/67"
           class="reply-btn text-small text-muted">回复</a>
      </li>
    </ul>
  </footer>
</div>

              </div>
            </div>
            
          
        </div>
      </div>
    </div>
    
  
</div>
  </section>
</div>
  </div>

    </div>
  </div>
</section>
<footer class="bg-white py-5 mt-5 text-small text-muted">
  <div class="flex-center">
    <div>&copy; 2017 追梦人物的博客</div>
  </div>
  
  
  
</footer>
<script>
    $('[data-menu]').menu();

    var InterValObj; //timer变量，控制时间
    var curCount = 120;//当前剩余秒数

    $('#js-send').on('click', function (event) {
        var $this = $(this);
        var $targetURL = $this.attr('data-target');
        $.post(
            $targetURL,
            {email: $('#id_email').val()},
            function (data) {
                if (data.ok) {
                    $this.attr("disabled", "true");
                    $this.text("重新发送验证码" + "(" + curCount + ")");
                    InterValObj = window.setInterval(SetRemainTime, 1000); //启动计时器，1秒执行一次
                    $('.message')
                        .find('span')
                        .text(data.msg)
                } else {
                    $('.message').find('span').text(data.msg)
                }
            }
        );
        return false;
    });

    //timer处理函数
    function SetRemainTime() {
        if (curCount === 0) {
            window.clearInterval(InterValObj);//停止计时器
            $('#js-send').removeAttr("disabled");//启用按钮
            $('#js-send').text("重新发送验证码");
        }
        else {
            curCount--;
            $('#js-send').text("重新发送验证码" + "(" + curCount + ")");
        }
    }

    $('#js-submit').on('click', function (event) {
        var $this = $(this);
        var $form = $('.email-binding-form');
        var $targetURL = $form.attr('action');
        console.log($targetURL);

        $.post(
            $targetURL,
            {
                email: $('#id_email').val(),
                verification_code: $('#id_verification_code').val()
            },
            function (data) {
                if (data.ok) {
                    location.reload();
                } else {
                    $('.message')
                        .find('span')
                        .text(data.msg)
                }
            }
        );
        return false;
    });


    var editor = new Simditor({
        textarea: $('#id_comment'),
        placeholder: "提出你的见解...",
        toolbarFloat: false,
        cleanPaste: true,
        toolbar: [
            'bold',
            'italic',
            'underline',
            'strikethrough',
            'color',
            'ol',
            'ul',
            'blockquote',
            'code',
            'table',
            'link',
            'image',
            'hr'
        ]
    });
</script>


</body>
</html>